#ifndef TIMER_H
#define TIMER_H

#include "Singleton.h"
#include "MutexLocker.h"

#include <Windows.h>

class Timer : public Uncopyable
{
	Timer();
	friend class Singleton<Timer>;
public:
	void UpdateTime();
	float GetDt();
	float GetTime();
	void SetTimeMS(unsigned int ms);
	unsigned int GetTimeMS() const;
	unsigned int GetDtMS() const;
private:
	float m_currentTime;
	float m_dt;
	unsigned int m_ticksPreviousFrame;
	Mutex m_mutex;
	unsigned int m_dtMS;
	unsigned int m_currentTimeMS;
};

typedef Singleton<Timer> TheTimer;

#endif //TIMER_H